﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
	Namespace="System.Web.UI" TagPrefix="asp" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <center>   <asp:Label ID="Label2" runat="server" Font-Size="XX-Large" 
        Text="Administration panel"></asp:Label></center>
        <br />
        <br />
    </div>
    <div>
        <asp:Label ID="Label1" runat="server" Font-Size="X-Large" 
        Text="Database Connection Strings Administration"></asp:Label>
        <br />
        <hr />
    </div>
     <div>
     
         <asp:ScriptManager ID="ScriptManager1" runat="server">
         </asp:ScriptManager>
         
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>        
         
        
         <asp:GridView ID="grdConnStrings" runat="server"   CellPadding="4" 
             ForeColor="Black" 
             GridLines="Vertical"
             AutoGenerateColumns="False" 
             BackColor="White" 
             BorderColor="#DEDFDE"
             BorderStyle="None" 
             BorderWidth="1px"
             onrowdeleting="grdConnStrings_RowDeleting" 
             onrowediting="grdConnStrings_RowEditing" 
             onrowcancelingedit="grdConnStrings_RowCancelingEdit"
             ShowFooter="True" 
             onrowupdating="grdConnStrings_RowUpdating"
            >
             <RowStyle BackColor="#F7F7DE" />
             <Columns>
                 <asp:CommandField ShowSelectButton="True" SelectText = "Select">
                     <ControlStyle Width="50px" />
                 </asp:CommandField>
                 
                 <asp:TemplateField  HeaderText = "DataBase Name"  >
                 <ItemTemplate>
                 <asp:Label ID="lblDBName"
                  runat="server" 
                  Width="300px"
                  Text='<%# Eval("DBName") %>'>
                  </asp:Label>
                 </ItemTemplate>                
                 <FooterTemplate>
                   <asp:TextBox ID="txtDBName"
                  runat="server" 
                  Width="300px"
                  Text='<%# Bind("DBName") %>'>
                  </asp:TextBox>                 
                 </FooterTemplate>                
                 </asp:TemplateField>
                 
                 <asp:TemplateField  HeaderText = "DataBase Provider"  >
                 <ItemTemplate>    
                  <asp:Label ID="lblDBProvider"
                  runat="server" 
                  Width="100px"
                  Text='<%# Bind("DBProvider") %>'>
                  </asp:Label>
                </ItemTemplate> 
                 <FooterTemplate>
                    <asp:DropDownList ID="cmbDBProviders" 
                  runat="server" 
                  Width="100px"  
                  DataTextField = "DBProvider"   
                  DataValueField = "DBProvider" 
                 >
                 <asp:ListItem>FireBird</asp:ListItem>
                 <asp:ListItem>SqlServer</asp:ListItem>
                  </asp:DropDownList>
                 </ItemTemplate> 
                 </FooterTemplate>                
                 </asp:TemplateField>
                 
                 <asp:TemplateField  HeaderText = "DataBase Location"  >
                 <ItemTemplate>
                 <asp:TextBox ID="lblDBloc"
                  TextMode ="MultiLine"
                  Height = "100px"
                  runat="server" 
                  Width="400px"     
                   Enabled ="false"                                
                  Text='<%# Eval("DBLocation") %>'>
                  </asp:TextBox>
                 </ItemTemplate>
                 <EditItemTemplate>
                 <asp:TextBox ID="txtDBloc"
                  runat="server" 
                  Width="400px"
                    Height = "100px"
                  TextMode ="MultiLine"
                  Text='<%# Bind("DBLocation") %>'>
                  </asp:TextBox>
                 </EditItemTemplate>
                 <FooterTemplate>
                   <asp:TextBox ID="txtDBloc"
                  runat="server" 
                  Width="400px"
                  Height = "100px"
                  TextMode ="MultiLine"
                  Text='<%# Bind("DBLocation") %>'>
                  </asp:TextBox>                 
                 </FooterTemplate>                
                 </asp:TemplateField>
                 
                <%-- <asp:TemplateField HeaderText = "User name"  >
                 <ItemTemplate>
                 <asp:Label ID="txtUsrLogin"
                  runat="server" 
                  Width="100px"
                  Text='<%# Eval("UsrLogin") %>'>
                  </asp:Label>
                 </ItemTemplate>
                 <EditItemTemplate>
                 <asp:TextBox ID="txtUsrLogin"
                  runat="server" 
                  Width="100px"
                  Text='<%# Bind("UsrLogin") %>'>
                  </asp:TextBox>
                 </EditItemTemplate>
                 <FooterTemplate>
                   <asp:TextBox ID="txtUsrLogin"
                  runat="server" 
                  Width="100px"
                  Text='<%# Bind("UsrLogin") %>'>
                  </asp:TextBox>                 
                 </FooterTemplate>                
                 </asp:TemplateField>                
                 
             <asp:TemplateField HeaderText = "Password"  >
                 <ItemTemplate>
                 <asp:Label ID="lblUsrPassword"
                  runat="server" 
                  Width="100px"
                  Text='<%# Eval("UsrPassword") %>'>
                  </asp:Label>
                 </ItemTemplate>
                 <EditItemTemplate>
                 <asp:TextBox ID="txtUsrPassword"
                  runat="server" 
                  Width="100px"
                  Text='<%# Bind("UsrPassword") %>'>
                  </asp:TextBox>
                 </EditItemTemplate>
                 <FooterTemplate>
                   <asp:TextBox ID="txtUsrPassword"
                  runat="server" 
                  Width="100px"
                  Text='<%# Bind("UsrPassword") %>'>
                  </asp:TextBox>                 
                 </FooterTemplate>                
                 </asp:TemplateField>      --%>                           
                 
               <asp:CommandField ShowEditButton="True" EditText ="Edit" UpdateText = "Save" CancelText = "Cancel">
                     <ControlStyle Width="50px" />
                 </asp:CommandField>
               
                <%-- <asp:CommandField ShowDeleteButton="True" DeleteText = "Delete">
                     <ControlStyle Width="50px" />
                 </asp:CommandField>--%>
                 
                 <asp:TemplateField >  
                     <ItemTemplate >                                       
                         <asp:LinkButton ID="btnDeleteConn" runat="server" CommandName="Delete"  
                        OnClientClick="javascript:return confirm('Are you sure you want to delete this database connection?');return false;"  
                        Text="Delete" />  
                     </ItemTemplate>    
                 </asp:TemplateField>  
                 
                   <asp:TemplateField HeaderText ="Insert">               
                 <FooterTemplate>
                  <asp:LinkButton runat="server" Width="50px" ID="btnInsertCommit" Text="Insert" OnClick="btnInsertCommit_Click">                  
                 </asp:LinkButton>                
                 </FooterTemplate>                 
                 </asp:TemplateField>
             </Columns>
             <FooterStyle BackColor="#CCCC99" />
             <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
             <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
             <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
             <AlternatingRowStyle BackColor="White" />
         
                 </asp:GridView>
            </ContentTemplate>         
         </asp:UpdatePanel>
         
            
    </div>
    <br />
     <hr />
     <div>
        <asp:Label ID="Label3" runat="server" Font-Size="X-Large" 
        Text="Available Web Services"></asp:Label>
        <br />
    </div>
     <hr />
     <div>
     <center>
      <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate> 
     
         <asp:GridView ID="grdWebServices" runat="server" CellPadding="4" 
             ForeColor="Black" GridLines="Vertical" AutoGenerateColumns="False" 
             onrowdatabound="grdWebServices_RowDataBound" BackColor="White" 
             BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px">
             <RowStyle BackColor="#F7F7DE" />          
         
             <Columns> 
            
                 <%--<asp:HyperLinkField                                       
                     DataTextField="ServiceName" 
                     HeaderText="Entity Logic  Web Service" DataNavigateUrlFields="ServiceUrl" 
                     NavigateUrl="~/BaseLogicService.asmx">
                     <ControlStyle Width="400px" />
                 </asp:HyperLinkField>--%>
                 <asp:BoundField DataField="ServiceName" 
                     HeaderText="Entity logic WebService name">
                     <ControlStyle Width="400px" />
                 </asp:BoundField>
                 <asp:TemplateField HeaderText="Web Service Url">
                 <ItemTemplate>
                     <asp:HyperLink runat="server" ID= "lnkServiceUrl">HyperLink
                     </asp:HyperLink>
                 </ItemTemplate>                    
                 </asp:TemplateField>
             </Columns>
             <FooterStyle BackColor="#CCCC99" />
             <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
             <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
             <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
             <AlternatingRowStyle BackColor="White" />
         
         </asp:GridView>
     </ContentTemplate>
     </asp:UpdatePanel> 
    </center>  
    </div>
     <hr />
    </form>
</body>
</html>
